﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="Util" targetNamespace="http://tempuri.org/Util.xsd" xmlns:mstns="http://tempuri.org/Util.xsd" xmlns="http://tempuri.org/Util.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="UtilQueries" GeneratorFunctionsComponentClassName="UtilQueries" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" UserFunctionsComponentName="UtilQueries" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="DIAptekaConnectionString" ConnectionStringObject="" IsAppSettingsProperty="True" Modifier="Assembly" Name="DIAptekaConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.DIProject.Properties.Settings.GlobalReference.Default.DIAptekaConnectionString" Provider="System.Data.SqlClient">
          </Connection>
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="LinkGoodsTableAdapter" GeneratorDataComponentClassName="LinkGoodsTableAdapter" Name="LinkGoods" UserDataComponentName="LinkGoodsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     c.Id, c.GoodsId, c.ContragentId, c.GoodsCode, c.GoodsName, c.CountryName, c.ManufacturerName, g.ManufactureBarCode, g.Id AS InnerGodsId
FROM         CA.GoodsVsContragents AS c INNER JOIN
                      CA.Goods AS g ON c.GoodsId = g.Id
WHERE     (c.ContragentId = @ContragentId)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="ContragentId" ColumnName="ContragentId" DataSourceName="DIApteka.CA.GoodsVsContragents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ContragentId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContragentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="GoodsId" DataSetColumn="GoodsId" />
              <Mapping SourceColumn="ContragentId" DataSetColumn="ContragentId" />
              <Mapping SourceColumn="GoodsCode" DataSetColumn="GoodsCode" />
              <Mapping SourceColumn="GoodsName" DataSetColumn="GoodsName" />
              <Mapping SourceColumn="CountryName" DataSetColumn="CountryName" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
              <Mapping SourceColumn="ManufactureBarCode" DataSetColumn="ManufactureBarCode" />
              <Mapping SourceColumn="InnerGodsId" DataSetColumn="InnerGodsId" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="GoodsTableAdapter" GeneratorDataComponentClassName="GoodsTableAdapter" Name="Goods" UserDataComponentName="GoodsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT     TOP (100) PERCENT CA.Goods.Id, CA.Assortment.Name, CO.Manufacturers.Name AS ManufacturerName, CO.Countries.Name AS CountryName, 
                      CA.Goods.ManufactureBarCode
FROM         CA.Goods INNER JOIN
                      CA.Assortment ON CA.Goods.AssortmentId = CA.Assortment.Id INNER JOIN
                      CO.Manufacturers ON CA.Goods.ManufacturerId = CO.Manufacturers.Id INNER JOIN
                      CO.Countries ON CA.Goods.CountryId = CO.Countries.Id AND CO.Manufacturers.CountryId = CO.Countries.Id AND 
                      CO.Manufacturers.CountryId = CO.Countries.Id
ORDER BY CA.Assortment.Name</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
              <Mapping SourceColumn="CountryName" DataSetColumn="CountryName" />
              <Mapping SourceColumn="ManufactureBarCode" DataSetColumn="ManufactureBarCode" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="AbsenceDocInsertTableAdapter" GeneratorDataComponentClassName="AbsenceDocInsertTableAdapter" Name="AbsenceDocInsert" UserDataComponentName="AbsenceDocInsertTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.dbo.AbsenceDocInsert" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>dbo.AbsenceDocInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@DocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="GId" DataSetColumn="GId" />
              <Mapping SourceColumn="DocTypeId" DataSetColumn="DocTypeId" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="DepartmentUserId" DataSetColumn="DepartmentUserId" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="AbsenceLinesInsertTableAdapter" GeneratorDataComponentClassName="AbsenceLinesInsertTableAdapter" Name="AbsenceLinesInsert" UserDataComponentName="AbsenceLinesInsertTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.dbo.AbsenceLinesInsert" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>dbo.AbsenceLinesInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@GoodsId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Qntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocId" DataSetColumn="DocId" />
              <Mapping SourceColumn="GoodsId" DataSetColumn="GoodsId" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CurrentPartyTableAdapter" GeneratorDataComponentClassName="CurrentPartyTableAdapter" Name="CurrentParty" UserDataComponentName="CurrentPartyTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>DECLARE @tab TABLE (PartyId int, Id int IDENTITY (1, 1), UNIQUE CLUSTERED (PartyId, Id)) 
IF (@DeptId = - 100) BEGIN INSERT INTO @tab (PartyId)
SELECT        CA.GoodsDocLines.PartyId
FROM    CA.GoodsDocLines INNER JOIN CA.Documents ON CA.GoodsDocLines.DocId = CA.Documents.Id
WHERE        CA.Documents.DocDate &lt; 
DATEADD(d,@MinusDay, CONVERT(DATETIME, CONVERT(VARCHAR(12), GETDATE(), 102), 102))
GROUP BY CA.GoodsDocLines.PartyId
HAVING        (SUM(CA.GoodsDocLines.Qntty) &gt; 0)
INSERT   INTO    @tab (PartyId)
SELECT   Id
FROM   CD.Parties
WHERE  RestQntty &gt; 0 END ELSE
BEGIN
INSERT INTO @tab(PartyId)
SELECT        CA.GoodsDocLines.PartyId
FROM  CA.GoodsDocLines
INNER JOIN CA.Documents ON CA.GoodsDocLines.DocId = CA.Documents.Id
WHERE  
CA.Documents.DocDate&lt;DATEADD(d,@MinusDay,CONVERT(DATETIME,CONVERT(VARCHAR(12),GETDATE(),102),102))
AND CA.Documents.DepartmentId = @DeptId
GROUP BY CA.GoodsDocLines.PartyId
HAVING   (SUM(CA.GoodsDocLines.Qntty)&gt;0)
INSERT INTO @tab(PartyId)
SELECT  Id
FROM   CD.Parties
WHERE  DepartmentId=@DeptId AND RestQntty&gt;0
END
DECLARE @tab1 TABLE (Id int PRIMARY KEY CLUSTERED)
INSERT INTO @tab1(Id)
SELECT DISTINCT   PartyId
FROM  @tab

SELECT vwGoodsDetailed.FullName, CD.Parties.RetailPrice, CD.Parties.RestQntty,
CD.Parties.Blocked, CD.Parties.Id, CD.InputLines.BatchNumber, CD.Parties.BarCode,
CD.InputLines.DocQntty, CA.Contragents.Name AS cName, CD.InputLines.ContragentDocDate,
CD.InputLines.SupplierPrice, vwGoodsDetailed.ManufacturerName, CD.InputLines.ReadyBefore,
CD.Parties.GoodsId as GoodsId
FROM  CA.Contragents INNER JOIN CD.InputLines
ON CA.Contragents.Id = CD.InputLines.ContragentId INNER JOIN
CD.Parties ON CD.InputLines.Id = CD.Parties.InputLineId INNER JOIN vwGoodsDetailed
ON CD.Parties.GoodsId = vwGoodsDetailed.Id INNER JOIN @tab1 AS t
ON t.Id = CD.Parties.Id  ORDER BY 1</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@deptId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@MinusDay" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="FullName" DataSetColumn="FullName" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="RestQntty" DataSetColumn="RestQntty" />
              <Mapping SourceColumn="Blocked" DataSetColumn="Blocked" />
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="BatchNumber" DataSetColumn="BatchNumber" />
              <Mapping SourceColumn="BarCode" DataSetColumn="BarCode" />
              <Mapping SourceColumn="DocQntty" DataSetColumn="DocQntty" />
              <Mapping SourceColumn="ContragentDocDate" DataSetColumn="ContragentDocDate" />
              <Mapping SourceColumn="SupplierPrice" DataSetColumn="SupplierPrice" />
              <Mapping SourceColumn="cName" DataSetColumn="cName" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
              <Mapping SourceColumn="ReadyBefore" DataSetColumn="ReadyBefore" />
              <Mapping SourceColumn="GoodsId" DataSetColumn="GoodsId" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="PartyDefaultTableAdapter" GeneratorDataComponentClassName="PartyDefaultTableAdapter" Name="PartyDefault" UserDataComponentName="PartyDefaultTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     CD.Parties.Id, CA.Documents.DocNumber, CA.Documents.ContragentDocDate, CA.Documents.DocDate, CA.Documents.Id AS docId, 
                      CA.Contragents.Name, CA.Documents.ContragentDocNumber, CD.Parties.BarCode, CD.Parties.RestQntty, CD.Parties.GoodsId, CA.Goods.RetailPack, 
                      CA.Goods.AllowUnPack
FROM         CA.Documents INNER JOIN
                      CD.Parties ON CA.Documents.Id = CD.Parties.DocId INNER JOIN
                      CA.Contragents ON CA.Documents.ContragentId = CA.Contragents.Id INNER JOIN
                      CA.Goods ON CD.Parties.GoodsId = CA.Goods.Id
WHERE     (CD.Parties.Id = @partyId)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="partyId" ColumnName="Id" DataSourceName="DIApteka.CD.Parties" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@partyId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="ContragentDocDate" DataSetColumn="ContragentDocDate" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="docId" DataSetColumn="docId" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="ContragentDocNumber" DataSetColumn="ContragentDocNumber" />
              <Mapping SourceColumn="BarCode" DataSetColumn="BarCode" />
              <Mapping SourceColumn="RestQntty" DataSetColumn="RestQntty" />
              <Mapping SourceColumn="GoodsId" DataSetColumn="GoodsId" />
              <Mapping SourceColumn="RetailPack" DataSetColumn="RetailPack" />
              <Mapping SourceColumn="AllowUnPack" DataSetColumn="AllowUnPack" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DepartmentsTableAdapter" GeneratorDataComponentClassName="DepartmentsTableAdapter" Name="Departments" UserDataComponentName="DepartmentsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DevDB.CO.Departments" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT        Id, Name
FROM            CO.Departments
ORDER BY Id</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="vwGoodsDetailedTableAdapter" GeneratorDataComponentClassName="vwGoodsDetailedTableAdapter" Name="vwGoodsDetailed" UserDataComponentName="vwGoodsDetailedTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIOffice.dbo.vwGoodsDetailed" DbObjectType="View" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     Id, FullName, ManufacturerName, CountryName
FROM         vwGoodsDetailed
WHERE     (ToDelete = 0)
ORDER BY FullName</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="FullName" DataSetColumn="FullName" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
              <Mapping SourceColumn="CountryName" DataSetColumn="CountryName" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DocInfoTableAdapter" GeneratorDataComponentClassName="DocInfoTableAdapter" Name="DocInfo" UserDataComponentName="DocInfoTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     CA.Documents.Id, CO.DocTypes.Name AS DocTypeName, CA.Documents.ParentId, CA.Documents.DocDate, CA.Documents.DocNumber, 
                      CA.Contragents.Name AS ContragentName, CA.Documents.ContragentDocDate, CA.Documents.ContragentDocNumber, CA.Documents.PaymentDate, 
                      CO.Departments.Name AS DepartmentName, CD.CashRegisters.Name AS CashName, CA.Documents.Note, CA.Documents.MD, CA.Documents.MW, 
                      CA.Documents.ContragentId
FROM         CO.Departments RIGHT OUTER JOIN
                      CD.DepartmentUsers RIGHT OUTER JOIN
                      CA.Documents INNER JOIN
                      CO.DocTypes ON CA.Documents.DocTypeId = CO.DocTypes.Id LEFT OUTER JOIN
                      CD.CashRegisters INNER JOIN
                      CD.CashRegisterShifts ON CD.CashRegisters.Id = CD.CashRegisterShifts.CashRegisterId ON 
                      CA.Documents.CashRegisterShiftId = CD.CashRegisterShifts.Id ON CD.DepartmentUsers.Id = CA.Documents.DepartmentUserId ON 
                      CO.Departments.Id = CA.Documents.DepartmentId LEFT OUTER JOIN
                      CA.Contragents ON CA.Documents.ContragentId = CA.Contragents.Id
WHERE     (CA.Documents.Id = @Id)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="Id" ColumnName="Id" DataSourceName="MendelOld.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocTypeName" DataSetColumn="DocTypeName" />
              <Mapping SourceColumn="ParentId" DataSetColumn="ParentId" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="ContragentName" DataSetColumn="ContragentName" />
              <Mapping SourceColumn="ContragentDocDate" DataSetColumn="ContragentDocDate" />
              <Mapping SourceColumn="ContragentDocNumber" DataSetColumn="ContragentDocNumber" />
              <Mapping SourceColumn="PaymentDate" DataSetColumn="PaymentDate" />
              <Mapping SourceColumn="DepartmentName" DataSetColumn="DepartmentName" />
              <Mapping SourceColumn="CashName" DataSetColumn="CashName" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="ContragentId" DataSetColumn="ContragentId" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="SmallPartyTableAdapter" GeneratorDataComponentClassName="SmallPartyTableAdapter" Name="SmallParty" UserDataComponentName="SmallPartyTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT     vwGoodsDetailed.FullName, CD.Parties.RestQntty, CD.Parties.RetailPrice, CD.Parties.BarCode
FROM         CD.Parties INNER JOIN
                      vwGoodsDetailed ON CD.Parties.GoodsId = vwGoodsDetailed.Id
WHERE     (CD.Parties.RestQntty &gt; 0) AND (CD.Parties.DepartmentId =
                          (SELECT     TOP (1) DepartmentId
                            FROM          PR.DepartmentOptions
                            ORDER BY DepartmentId))
ORDER BY vwGoodsDetailed.FullName</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="FullName" DataSetColumn="FullName" />
              <Mapping SourceColumn="RestQntty" DataSetColumn="RestQntty" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="BarCode" DataSetColumn="BarCode" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="OstatkiTableAdapter" GeneratorDataComponentClassName="OstatkiTableAdapter" Name="Ostatki" UserDataComponentName="OstatkiTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     g.Id AS GoodsId, p.Id AS PartyId, g.FullName, g.ManufacturerName, g.CountryName, p.RetailPrice, p.BarCode, p.RestQntty, p.Blocked AS BlockedParty, 
                      il.ContragentId, il.SupplierPrice
FROM         CD.Parties AS p INNER JOIN
                      vwGoodsDetailed AS g ON p.GoodsId = g.Id INNER JOIN
                      CD.InputLines AS il ON il.Id = p.InputLineId
WHERE     (p.RestQntty &gt; 0) AND (p.DepartmentId = @DepartmentId)
ORDER BY g.FullName</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="DepartmentId" ColumnName="DepartmentId" DataSourceName="DIApteka.CD.Parties" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DepartmentId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="DepartmentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="GoodsId" DataSetColumn="GoodsId" />
              <Mapping SourceColumn="PartyId" DataSetColumn="PartyId" />
              <Mapping SourceColumn="FullName" DataSetColumn="FullName" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
              <Mapping SourceColumn="CountryName" DataSetColumn="CountryName" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="BarCode" DataSetColumn="BarCode" />
              <Mapping SourceColumn="RestQntty" DataSetColumn="RestQntty" />
              <Mapping SourceColumn="BlockedParty" DataSetColumn="BlockedParty" />
              <Mapping SourceColumn="ContragentId" DataSetColumn="ContragentId" />
              <Mapping SourceColumn="SupplierPrice" DataSetColumn="SupplierPrice" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CurrentParty1TableAdapter" GeneratorDataComponentClassName="CurrentParty1TableAdapter" Name="CurrentParty1" UserDataComponentName="CurrentParty1TableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>DECLARE @tab TABLE (PartyId int, Id int IDENTITY (1, 1), UNIQUE CLUSTERED (PartyId, Id)) IF (@DeptId = - 100) BEGIN INSERT INTO @tab (PartyId)
                                                                                                                                                                                                                                                                   SELECT     CA.GoodsDocLines.PartyId
                                                                                                                                                                                                                                                                   FROM         CA.GoodsDocLines INNER JOIN
                                                                                                                                                                                                                                                                                         CA.Documents ON 
                                                                                                                                                                                                                                                                                         CA.GoodsDocLines.DocId = CA.Documents.Id
                                                                                                                                                                                                                                                                   WHERE     CA.Documents.DocDate &lt; DATEADD(d,
                                                                                                                                                                                                                                                                                          @MinusDay, 
                                                                                                                                                                                                                                                                                         CONVERT(DATETIME, 
                                                                                                                                                                                                                                                                                         CONVERT(VARCHAR(12), 
                                                                                                                                                                                                                                                                                         GETDATE(), 102), 102))
                                                                                                                                                                                                                                                                   GROUP BY CA.GoodsDocLines.PartyId
                                                                                                                                                                                                                                                                   HAVING      (SUM(CA.GoodsDocLines.Qntty)
                                                                                                                                                                                                                                                                                          &gt; 0)
                                                                                                                                                                                                                                                                                             INSERT      
                                                                                                                                                                                                                                                                                              INTO            @tab (PartyId)
                                                                                                                                                                                                                                                                                                                         SELECT     Id
                                                                                                                                                                                                                                                                                                                          FROM         CD.Parties
                                                                                                                                                                                                                                                                                                                          WHERE     RestQntty
                                                                                                                                                                                                                                                                                                                                                  &gt; 0 END
                                                                                                                                                                                                                                                                                                                                                  ELSE
                                                                                                                                                                                                                                                                                                                                                  BEGIN
                                                                                                                                                                                                                                                                                                                                                     INSERT      
                                                                                                                                                                                                                                                                                                                                                      INTO            @tab
                                                                                                                                                                                                                                                                                                                                                                              (PartyId)
                                                                                                                                                                                                                                                                                                                                                                                 SELECT     CA.GoodsDocLines.PartyId
                                                                                                                                                                                                                                                                                                                                                                                  FROM         CA.GoodsDocLines
                                                                                                                                                                                                                                                                                                                                                                                                          INNER
                                                                                                                                                                                                                                                                                                                                                                                                          JOIN
                                                                                                                                                                                                                                                                                                                                                                                                         CA.Documents
                                                                                                                                                                                                                                                                                                                                                                                                          ON
                                                                                                                                                                                                                                                                                                                                                                                                          CA.GoodsDocLines.DocId
                                                                                                                                                                                                                                                                                                                                                                                                          =
                                                                                                                                                                                                                                                                                                                                                                                                          CA.Documents.Id
                                                                                                                                                                                                                                                                                                                                                                                  WHERE     CA.Documents.DocDate
                                                                                                                                                                                                                                                                                                                                                                                                          &lt;
                                                                                                                                                                                                                                                                                                                                                                                                          DATEADD(d,
                                                                                                                                                                                                                                                                                                                                                                                                          @MinusDay,
                                                                                                                                                                                                                                                                                                                                                                                                          CONVERT(DATETIME,
                                                                                                                                                                                                                                                                                                                                                                                                          CONVERT(VARCHAR(12),
                                                                                                                                                                                                                                                                                                                                                                                                          GETDATE(),
                                                                                                                                                                                                                                                                                                                                                                                                          102),
                                                                                                                                                                                                                                                                                                                                                                                                          102))
                                                                                                                                                                                                                                                                                                                                                                                                          AND
                                                                                                                                                                                                                                                                                                                                                                                                          CA.Documents.DepartmentId
                                                                                                                                                                                                                                                                                                                                                                                                          =
                                                                                                                                                                                                                                                                                                                                                                                                          @DeptId
                                                                                                                                                                                                                                                                                                                                                                                  GROUP
                                                                                                                                                                                                                                                                                                                                                                                                          BY
                                                                                                                                                                                                                                                                                                                                                                                                          CA.GoodsDocLines.PartyId
                                                                                                                                                                                                                                                                                                                                                                                  HAVING      (SUM(CA.GoodsDocLines.Qntty)
                                                                                                                                                                                                                                                                                                                                                                                                          &gt;
                                                                                                                                                                                                                                                                                                                                                                                                          0)
                                                                                                                                                                                                                                                                                                                                                                                                             INSERT      
                                                                                                                                                                                                                                                                                                                                                                                                              INTO            @tab
                                                                                                                                                                                                                                                                                                                                                                                                                                      (PartyId)
                                                                                                                                                                                                                                                                                                                                                                                                                                         SELECT     Id
                                                                                                                                                                                                                                                                                                                                                                                                                                          FROM         CD.Parties
                                                                                                                                                                                                                                                                                                                                                                                                                                          WHERE     DepartmentId
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @DeptId
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  AND
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RestQntty
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  &gt;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  END
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  DECLARE
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @tab1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TABLE
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (Id
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  int
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  PRIMARY
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  KEY
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  CLUSTERED)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                     INSERT      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      INTO            @tab1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (Id)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 SELECT
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   DISTINCT 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         PartyId
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FROM         @tab
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             SELECT     vwGoodsDetailed.FullName,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.Parties.RetailPrice,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.Parties.RestQntty,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.Parties.Blocked,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.Parties.Id,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.InputLines.BatchNumber,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.Parties.BarCode,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.InputLines.DocQntty,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CA.Contragents.Name
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      AS
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      cName,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.InputLines.ContragentDocDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      SupplierPrice
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      dbo.ParentSupplierPriceForChild(CD.InputLines.GoodsId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.Parties.GoodsId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.InputLines.SupplierPrice),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      vwGoodsDetailed.ManufacturerName,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.InputLines.ReadyBefore,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.Parties.GoodsId
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      AS
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      GoodsId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.InputLines.ContragentId
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FROM         CA.Contragents
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      INNER
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      JOIN
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     CD.InputLines
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ON
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CA.Contragents.Id
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.InputLines.ContragentId
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      INNER
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      JOIN
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     CD.Parties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ON
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.InputLines.Id
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.Parties.InputLineId
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      INNER
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      JOIN
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     vwGoodsDetailed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ON
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.Parties.GoodsId
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      vwGoodsDetailed.Id
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      INNER
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      JOIN
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     @tab1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      AS
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      t
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ON
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      t
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      .Id
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CD.Parties.Id
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ORDER
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      BY
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      1</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@deptId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@MinusDay" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="FullName" DataSetColumn="FullName" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="RestQntty" DataSetColumn="RestQntty" />
              <Mapping SourceColumn="Blocked" DataSetColumn="Blocked" />
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="BatchNumber" DataSetColumn="BatchNumber" />
              <Mapping SourceColumn="BarCode" DataSetColumn="BarCode" />
              <Mapping SourceColumn="DocQntty" DataSetColumn="DocQntty" />
              <Mapping SourceColumn="ContragentDocDate" DataSetColumn="ContragentDocDate" />
              <Mapping SourceColumn="SupplierPrice" DataSetColumn="SupplierPrice" />
              <Mapping SourceColumn="cName" DataSetColumn="cName" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
              <Mapping SourceColumn="ReadyBefore" DataSetColumn="ReadyBefore" />
              <Mapping SourceColumn="GoodsId" DataSetColumn="GoodsId" />
              <Mapping SourceColumn="ContragentId" DataSetColumn="ContragentId" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources>
          <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.CA.Contragents" DbObjectType="Table" GenerateShortCommands="True" GeneratorSourceName="ContragentNameFromId" MethodsParameterType="CLR" Modifier="Public" Name="ContragentNameFromId" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy" UserSourceName="ContragentNameFromId">
            <SelectCommand>
              <DbCommand CommandType="Text" ModifiedByUser="True">
                <CommandText>SELECT     Name
FROM         CA.Contragents
WHERE     (Id = @Id)</CommandText>
                <Parameters>
                  <Parameter AllowDbNull="False" AutogeneratedName="Id" ColumnName="Id" DataSourceName="DIApteka.CA.Contragents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
          <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIOffice.CA.Goods" DbObjectType="Table" GenerateShortCommands="True" GeneratorSourceName="GoodChildId" MethodsParameterType="CLR" Modifier="Public" Name="GoodChildId" QueryType="Scalar" ScalarCallRetval="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy1" UserSourceName="GoodChildId">
            <SelectCommand>
              <DbCommand CommandType="Text" ModifiedByUser="True">
                <CommandText>SELECT     ChildId
FROM         CA.Goods
WHERE     (Id = @Id)</CommandText>
                <Parameters>
                  <Parameter AllowDbNull="False" AutogeneratedName="Id" ColumnName="Id" DataSourceName="DIOffice.CA.Goods" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
          <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.dbo.vwGoodsDetailed" DbObjectType="View" GenerateShortCommands="True" GeneratorSourceName="GoodsIdFromName" MethodsParameterType="CLR" Modifier="Public" Name="GoodsIdFromName" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy2" UserSourceName="GoodsIdFromName">
            <SelectCommand>
              <DbCommand CommandType="Text" ModifiedByUser="True">
                <CommandText>SELECT     TOP (1) Id
FROM         vwGoodsDetailed
WHERE     (FullName = @fullName)</CommandText>
                <Parameters>
                  <Parameter AllowDbNull="True" AutogeneratedName="fullName" ColumnName="FullName" DataSourceName="DIApteka.dbo.vwGoodsDetailed" DataTypeServer="varchar(213)" DbType="AnsiString" Direction="Input" ParameterName="@fullName" Precision="0" ProviderType="VarChar" Scale="0" Size="213" SourceColumn="FullName" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
          <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.CD.DepartmentUsers" DbObjectType="Table" GenerateShortCommands="True" GeneratorSourceName="UserIdFromLogin" MethodsParameterType="CLR" Modifier="Public" Name="UserIdFromLogin" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy3" UserSourceName="UserIdFromLogin">
            <SelectCommand>
              <DbCommand CommandType="Text" ModifiedByUser="True">
                <CommandText>SELECT     Id
FROM         CD.DepartmentUsers
WHERE     (Login = @Login)</CommandText>
                <Parameters>
                  <Parameter AllowDbNull="False" AutogeneratedName="Login" ColumnName="Login" DataSourceName="DIApteka.CD.DepartmentUsers" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@Login" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="Login" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
          <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="GetLastAssortmentId" MethodsParameterType="CLR" Modifier="Public" Name="GetLastAssortmentId" QueryType="Scalar" ScalarCallRetval="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy4" UserSourceName="GetLastAssortmentId">
            <SelectCommand>
              <DbCommand CommandType="Text" ModifiedByUser="True">
                <CommandText>SELECT     MAX(Id) AS Id
FROM         CA.Assortment</CommandText>
                <Parameters>
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
          <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.CA.Goods" DbObjectType="Table" GenerateShortCommands="True" GeneratorSourceName="GetLastGoodsId" MethodsParameterType="CLR" Modifier="Public" Name="GetLastGoodsId" QueryType="Scalar" ScalarCallRetval="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy5" UserSourceName="GetLastGoodsId">
            <SelectCommand>
              <DbCommand CommandType="Text" ModifiedByUser="True">
                <CommandText>SELECT     Id
FROM         CA.Goods
WHERE     (MD =
                          (SELECT     MAX(MD) AS Expr1
                            FROM          CA.Goods AS Goods_1))</CommandText>
                <Parameters>
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
          <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="AllPartySumm" MethodsParameterType="CLR" Modifier="Public" Name="AllPartySumm" QueryType="Scalar" ScalarCallRetval="System.Decimal, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy6" UserSourceName="AllPartySumm">
            <SelectCommand>
              <DbCommand CommandType="Text" ModifiedByUser="True">
                <CommandText>SELECT     SUM(RetailPrice * RestQntty) AS Expr1
FROM         CD.Parties
WHERE     (RetailPrice &gt; 0)</CommandText>
                <Parameters>
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
          <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.CD.Parties" DbObjectType="Table" GenerateShortCommands="True" GeneratorSourceName="GetPartyCount" MethodsParameterType="CLR" Modifier="Public" Name="GetPartyCount" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy7" UserSourceName="GetPartyCount">
            <SelectCommand>
              <DbCommand CommandType="Text" ModifiedByUser="True">
                <CommandText>SELECT     RestQntty
FROM         CD.Parties
WHERE     (Id = @id)</CommandText>
                <Parameters>
                  <Parameter AllowDbNull="False" AutogeneratedName="id" ColumnName="Id" DataSourceName="DIApteka.CD.Parties" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
          <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="GetNLKDSumm" MethodsParameterType="CLR" Modifier="Public" Name="GetNLKDSumm" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy8" UserSourceName="GetNLKDSumm">
            <SelectCommand>
              <DbCommand CommandType="Text" ModifiedByUser="True">
                <CommandText>SELECT     SUM(CD.InputLines.SupplierPrice * CD.InputLines.DocQntty) AS Expr1
FROM         CA.Documents INNER JOIN
                      CD.InputLines ON CA.Documents.Id = CD.InputLines.DocId
WHERE     (CA.Documents.Id = @Id)</CommandText>
                <Parameters>
                  <Parameter AllowDbNull="False" AutogeneratedName="Id" ColumnName="Id" DataSourceName="DIApteka.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
          <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIOffice.CA.Goods" DbObjectType="Table" GenerateShortCommands="True" GeneratorSourceName="GoodsChildQuery" MethodsParameterType="CLR" Modifier="Public" Name="GoodsChildQuery" QueryType="Scalar" ScalarCallRetval="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy9" UserSourceName="GoodsChildQuery">
            <SelectCommand>
              <DbCommand CommandType="Text" ModifiedByUser="True">
                <CommandText>SELECT     Id
FROM         CA.Goods
WHERE     (AssortmentId = @AssortmentId) AND (ManufacturerId = @ManufacturerId) AND (RetailPack = @RetailPack) </CommandText>
                <Parameters>
                  <Parameter AllowDbNull="False" AutogeneratedName="AssortmentId" ColumnName="AssortmentId" DataSourceName="DIOffice.CA.Goods" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@AssortmentId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="AssortmentId" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                  <Parameter AllowDbNull="False" AutogeneratedName="ManufacturerId" ColumnName="ManufacturerId" DataSourceName="DIOffice.CA.Goods" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ManufacturerId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ManufacturerId" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                  <Parameter AllowDbNull="False" AutogeneratedName="RetailPack" ColumnName="RetailPack" DataSourceName="DIOffice.CA.Goods" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@RetailPack" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="RetailPack" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
          <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIOffice.CA.Documents" DbObjectType="Table" GenerateShortCommands="True" GeneratorSourceName="ContragentFromDocId" MethodsParameterType="CLR" Modifier="Public" Name="ContragentFromDocId" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy10" UserSourceName="ContragentFromDocId">
            <SelectCommand>
              <DbCommand CommandType="Text" ModifiedByUser="True">
                <CommandText>SELECT     ContragentId
FROM         CA.Documents
WHERE     (Id = @Id)</CommandText>
                <Parameters>
                  <Parameter AllowDbNull="False" AutogeneratedName="Id" ColumnName="Id" DataSourceName="DIOffice.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
          <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DilanOffice.PR.DepartmentOptions" DbObjectType="Table" GenerateShortCommands="True" GeneratorSourceName="CurrentDepartment" MethodsParameterType="CLR" Modifier="Public" Name="CurrentDepartment" QueryType="Scalar" ScalarCallRetval="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy11" UserSourceName="CurrentDepartment">
            <SelectCommand>
              <DbCommand CommandType="Text" ModifiedByUser="True">
                <CommandText>SELECT     TOP (1) DepartmentId
FROM         PR.DepartmentOptions</CommandText>
                <Parameters>
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
        </Sources>
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="Util" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="Util" msprop:Generator_DataSetName="Util">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="LinkGoods" msprop:Generator_UserTableName="LinkGoods" msprop:Generator_RowDeletedName="LinkGoodsRowDeleted" msprop:Generator_RowChangedName="LinkGoodsRowChanged" msprop:Generator_RowClassName="LinkGoodsRow" msprop:Generator_RowChangingName="LinkGoodsRowChanging" msprop:Generator_RowEvArgName="LinkGoodsRowChangeEvent" msprop:Generator_RowEvHandlerName="LinkGoodsRowChangeEventHandler" msprop:Generator_TableClassName="LinkGoodsDataTable" msprop:Generator_TableVarName="tableLinkGoods" msprop:Generator_RowDeletingName="LinkGoodsRowDeleting" msprop:Generator_TablePropName="LinkGoods">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="GoodsId" msprop:Generator_UserColumnName="GoodsId" msprop:Generator_ColumnVarNameInTable="columnGoodsId" msprop:Generator_ColumnPropNameInRow="GoodsId" msprop:Generator_ColumnPropNameInTable="GoodsIdColumn" type="xs:int" />
              <xs:element name="ContragentId" msprop:Generator_UserColumnName="ContragentId" msprop:Generator_ColumnVarNameInTable="columnContragentId" msprop:Generator_ColumnPropNameInRow="ContragentId" msprop:Generator_ColumnPropNameInTable="ContragentIdColumn" type="xs:int" />
              <xs:element name="GoodsCode" msprop:Generator_UserColumnName="GoodsCode" msprop:Generator_ColumnVarNameInTable="columnGoodsCode" msprop:Generator_ColumnPropNameInRow="GoodsCode" msprop:Generator_ColumnPropNameInTable="GoodsCodeColumn" type="xs:int" />
              <xs:element name="GoodsName" msprop:Generator_UserColumnName="GoodsName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="GoodsName" msprop:Generator_ColumnPropNameInTable="GoodsNameColumn" msprop:Generator_ColumnVarNameInTable="columnGoodsName">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CountryName" msprop:Generator_UserColumnName="CountryName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="CountryName" msprop:Generator_ColumnPropNameInTable="CountryNameColumn" msprop:Generator_ColumnVarNameInTable="columnCountryName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="70" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufactureBarCode" msprop:Generator_UserColumnName="ManufactureBarCode" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ManufactureBarCode" msprop:Generator_ColumnPropNameInTable="ManufactureBarCodeColumn" msprop:Generator_ColumnVarNameInTable="columnManufactureBarCode" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="13" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="InnerGodsId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="InnerGodsId" msprop:Generator_ColumnVarNameInTable="columnInnerGodsId" msprop:Generator_ColumnPropNameInRow="InnerGodsId" msprop:Generator_ColumnPropNameInTable="InnerGodsIdColumn" type="xs:int" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Goods" msprop:Generator_UserTableName="Goods" msprop:Generator_RowDeletedName="GoodsRowDeleted" msprop:Generator_RowChangedName="GoodsRowChanged" msprop:Generator_RowClassName="GoodsRow" msprop:Generator_RowChangingName="GoodsRowChanging" msprop:Generator_RowEvArgName="GoodsRowChangeEvent" msprop:Generator_RowEvHandlerName="GoodsRowChangeEventHandler" msprop:Generator_TableClassName="GoodsDataTable" msprop:Generator_TableVarName="tableGoods" msprop:Generator_RowDeletingName="GoodsRowDeleting" msprop:Generator_TablePropName="Goods">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:Generator_ColumnPropNameInRow="ManufacturerName" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CountryName" msprop:Generator_UserColumnName="CountryName" msprop:Generator_ColumnPropNameInRow="CountryName" msprop:Generator_ColumnVarNameInTable="columnCountryName" msprop:Generator_ColumnPropNameInTable="CountryNameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufactureBarCode" msprop:Generator_UserColumnName="ManufactureBarCode" msprop:Generator_ColumnPropNameInRow="ManufactureBarCode" msprop:Generator_ColumnVarNameInTable="columnManufactureBarCode" msprop:Generator_ColumnPropNameInTable="ManufactureBarCodeColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="13" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="AbsenceDocInsert" msprop:Generator_UserTableName="AbsenceDocInsert" msprop:Generator_RowDeletedName="AbsenceDocInsertRowDeleted" msprop:Generator_RowChangedName="AbsenceDocInsertRowChanged" msprop:Generator_RowClassName="AbsenceDocInsertRow" msprop:Generator_RowChangingName="AbsenceDocInsertRowChanging" msprop:Generator_RowEvArgName="AbsenceDocInsertRowChangeEvent" msprop:Generator_RowEvHandlerName="AbsenceDocInsertRowChangeEventHandler" msprop:Generator_TableClassName="AbsenceDocInsertDataTable" msprop:Generator_TableVarName="tableAbsenceDocInsert" msprop:Generator_RowDeletingName="AbsenceDocInsertRowDeleting" msprop:Generator_TablePropName="AbsenceDocInsert">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="GId" msprop:Generator_UserColumnName="GId" msprop:Generator_ColumnPropNameInRow="GId" msprop:Generator_ColumnVarNameInTable="columnGId" msprop:Generator_ColumnPropNameInTable="GIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="DocTypeId" msprop:Generator_UserColumnName="DocTypeId" msprop:Generator_ColumnPropNameInRow="DocTypeId" msprop:Generator_ColumnVarNameInTable="columnDocTypeId" msprop:Generator_ColumnPropNameInTable="DocTypeIdColumn" type="xs:int" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:Generator_ColumnPropNameInRow="DocNumber" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DepartmentUserId" msprop:Generator_UserColumnName="DepartmentUserId" msprop:Generator_ColumnPropNameInRow="DepartmentUserId" msprop:Generator_ColumnVarNameInTable="columnDepartmentUserId" msprop:Generator_ColumnPropNameInTable="DepartmentUserIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="AbsenceLinesInsert" msprop:Generator_UserTableName="AbsenceLinesInsert" msprop:Generator_RowDeletedName="AbsenceLinesInsertRowDeleted" msprop:Generator_RowChangedName="AbsenceLinesInsertRowChanged" msprop:Generator_RowClassName="AbsenceLinesInsertRow" msprop:Generator_RowChangingName="AbsenceLinesInsertRowChanging" msprop:Generator_RowEvArgName="AbsenceLinesInsertRowChangeEvent" msprop:Generator_RowEvHandlerName="AbsenceLinesInsertRowChangeEventHandler" msprop:Generator_TableClassName="AbsenceLinesInsertDataTable" msprop:Generator_TableVarName="tableAbsenceLinesInsert" msprop:Generator_RowDeletingName="AbsenceLinesInsertRowDeleting" msprop:Generator_TablePropName="AbsenceLinesInsert">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="DocId" msprop:Generator_UserColumnName="DocId" msprop:Generator_ColumnPropNameInRow="DocId" msprop:Generator_ColumnVarNameInTable="columnDocId" msprop:Generator_ColumnPropNameInTable="DocIdColumn" type="xs:int" />
              <xs:element name="GoodsId" msprop:Generator_UserColumnName="GoodsId" msprop:Generator_ColumnPropNameInRow="GoodsId" msprop:Generator_ColumnVarNameInTable="columnGoodsId" msprop:Generator_ColumnPropNameInTable="GoodsIdColumn" type="xs:int" />
              <xs:element name="Qntty" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="CurrentParty" msprop:Generator_UserTableName="CurrentParty" msprop:Generator_RowDeletedName="CurrentPartyRowDeleted" msprop:Generator_RowChangedName="CurrentPartyRowChanged" msprop:Generator_RowClassName="CurrentPartyRow" msprop:Generator_RowChangingName="CurrentPartyRowChanging" msprop:Generator_RowEvArgName="CurrentPartyRowChangeEvent" msprop:Generator_RowEvHandlerName="CurrentPartyRowChangeEventHandler" msprop:Generator_TableClassName="CurrentPartyDataTable" msprop:Generator_TableVarName="tableCurrentParty" msprop:Generator_RowDeletingName="CurrentPartyRowDeleting" msprop:Generator_TablePropName="CurrentParty">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="FullName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="FullName" msprop:Generator_ColumnPropNameInRow="FullName" msprop:Generator_ColumnVarNameInTable="columnFullName" msprop:Generator_ColumnPropNameInTable="FullNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" />
              <xs:element name="RestQntty" msprop:Generator_UserColumnName="RestQntty" msprop:Generator_ColumnPropNameInRow="RestQntty" msprop:Generator_ColumnVarNameInTable="columnRestQntty" msprop:Generator_ColumnPropNameInTable="RestQnttyColumn" type="xs:int" />
              <xs:element name="Blocked" msprop:Generator_UserColumnName="Blocked" msprop:Generator_ColumnPropNameInRow="Blocked" msprop:Generator_ColumnVarNameInTable="columnBlocked" msprop:Generator_ColumnPropNameInTable="BlockedColumn" type="xs:boolean" />
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="BatchNumber" msprop:Generator_UserColumnName="BatchNumber" msprop:Generator_ColumnPropNameInRow="BatchNumber" msprop:Generator_ColumnVarNameInTable="columnBatchNumber" msprop:Generator_ColumnPropNameInTable="BatchNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="BarCode" msprop:Generator_UserColumnName="BarCode" msprop:Generator_ColumnPropNameInRow="BarCode" msprop:Generator_ColumnVarNameInTable="columnBarCode" msprop:Generator_ColumnPropNameInTable="BarCodeColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DocQntty" msprop:Generator_UserColumnName="DocQntty" msprop:Generator_ColumnPropNameInRow="DocQntty" msprop:Generator_ColumnVarNameInTable="columnDocQntty" msprop:Generator_ColumnPropNameInTable="DocQnttyColumn" type="xs:int" />
              <xs:element name="ContragentDocDate" msprop:Generator_UserColumnName="ContragentDocDate" msprop:Generator_ColumnPropNameInRow="ContragentDocDate" msprop:Generator_ColumnVarNameInTable="columnContragentDocDate" msprop:Generator_ColumnPropNameInTable="ContragentDocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="SupplierPrice" msprop:Generator_UserColumnName="SupplierPrice" msprop:Generator_ColumnPropNameInRow="SupplierPrice" msprop:Generator_ColumnVarNameInTable="columnSupplierPrice" msprop:Generator_ColumnPropNameInTable="SupplierPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="cName" msprop:Generator_UserColumnName="cName" msprop:Generator_ColumnPropNameInRow="cName" msprop:Generator_ColumnVarNameInTable="columncName" msprop:Generator_ColumnPropNameInTable="cNameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:Generator_ColumnPropNameInRow="ManufacturerName" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ReadyBefore" msprop:Generator_UserColumnName="ReadyBefore" msprop:Generator_ColumnVarNameInTable="columnReadyBefore" msprop:Generator_ColumnPropNameInRow="ReadyBefore" msprop:Generator_ColumnPropNameInTable="ReadyBeforeColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="GoodsId" msprop:Generator_UserColumnName="GoodsId" msprop:Generator_ColumnVarNameInTable="columnGoodsId" msprop:Generator_ColumnPropNameInRow="GoodsId" msprop:Generator_ColumnPropNameInTable="GoodsIdColumn" type="xs:int" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="PartyDefault" msprop:Generator_UserTableName="PartyDefault" msprop:Generator_RowDeletedName="PartyDefaultRowDeleted" msprop:Generator_RowChangedName="PartyDefaultRowChanged" msprop:Generator_RowClassName="PartyDefaultRow" msprop:Generator_RowChangingName="PartyDefaultRowChanging" msprop:Generator_RowEvArgName="PartyDefaultRowChangeEvent" msprop:Generator_RowEvHandlerName="PartyDefaultRowChangeEventHandler" msprop:Generator_TableClassName="PartyDefaultDataTable" msprop:Generator_TableVarName="tablePartyDefault" msprop:Generator_RowDeletingName="PartyDefaultRowDeleting" msprop:Generator_TablePropName="PartyDefault">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:Generator_ColumnPropNameInRow="DocNumber" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ContragentDocDate" msprop:Generator_UserColumnName="ContragentDocDate" msprop:Generator_ColumnPropNameInRow="ContragentDocDate" msprop:Generator_ColumnVarNameInTable="columnContragentDocDate" msprop:Generator_ColumnPropNameInTable="ContragentDocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" />
              <xs:element name="docId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="docId" msprop:Generator_ColumnPropNameInRow="docId" msprop:Generator_ColumnVarNameInTable="columndocId" msprop:Generator_ColumnPropNameInTable="docIdColumn" type="xs:int" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ContragentDocNumber" msprop:Generator_UserColumnName="ContragentDocNumber" msprop:Generator_ColumnPropNameInRow="ContragentDocNumber" msprop:Generator_ColumnVarNameInTable="columnContragentDocNumber" msprop:Generator_ColumnPropNameInTable="ContragentDocNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="BarCode" msprop:Generator_UserColumnName="BarCode" msprop:Generator_ColumnVarNameInTable="columnBarCode" msprop:Generator_ColumnPropNameInRow="BarCode" msprop:Generator_ColumnPropNameInTable="BarCodeColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RestQntty" msprop:Generator_UserColumnName="RestQntty" msprop:Generator_ColumnVarNameInTable="columnRestQntty" msprop:Generator_ColumnPropNameInRow="RestQntty" msprop:Generator_ColumnPropNameInTable="RestQnttyColumn" type="xs:int" />
              <xs:element name="GoodsId" msprop:Generator_UserColumnName="GoodsId" msprop:Generator_ColumnVarNameInTable="columnGoodsId" msprop:Generator_ColumnPropNameInRow="GoodsId" msprop:Generator_ColumnPropNameInTable="GoodsIdColumn" type="xs:int" />
              <xs:element name="RetailPack" msprop:Generator_UserColumnName="RetailPack" msprop:Generator_ColumnVarNameInTable="columnRetailPack" msprop:Generator_ColumnPropNameInRow="RetailPack" msprop:Generator_ColumnPropNameInTable="RetailPackColumn" type="xs:int" />
              <xs:element name="AllowUnPack" msprop:Generator_UserColumnName="AllowUnPack" msprop:Generator_ColumnVarNameInTable="columnAllowUnPack" msprop:Generator_ColumnPropNameInRow="AllowUnPack" msprop:Generator_ColumnPropNameInTable="AllowUnPackColumn" type="xs:boolean" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Departments" msprop:Generator_UserTableName="Departments" msprop:Generator_RowDeletedName="DepartmentsRowDeleted" msprop:Generator_RowChangedName="DepartmentsRowChanged" msprop:Generator_RowClassName="DepartmentsRow" msprop:Generator_RowChangingName="DepartmentsRowChanging" msprop:Generator_RowEvArgName="DepartmentsRowChangeEvent" msprop:Generator_RowEvHandlerName="DepartmentsRowChangeEventHandler" msprop:Generator_TableClassName="DepartmentsDataTable" msprop:Generator_TableVarName="tableDepartments" msprop:Generator_RowDeletingName="DepartmentsRowDeleting" msprop:Generator_TablePropName="Departments">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="vwGoodsDetailed" msprop:Generator_UserTableName="vwGoodsDetailed" msprop:Generator_RowDeletedName="vwGoodsDetailedRowDeleted" msprop:Generator_RowChangedName="vwGoodsDetailedRowChanged" msprop:Generator_RowClassName="vwGoodsDetailedRow" msprop:Generator_RowChangingName="vwGoodsDetailedRowChanging" msprop:Generator_RowEvArgName="vwGoodsDetailedRowChangeEvent" msprop:Generator_RowEvHandlerName="vwGoodsDetailedRowChangeEventHandler" msprop:Generator_TableClassName="vwGoodsDetailedDataTable" msprop:Generator_TableVarName="tablevwGoodsDetailed" msprop:Generator_RowDeletingName="vwGoodsDetailedRowDeleting" msprop:Generator_TablePropName="vwGoodsDetailed">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="FullName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="FullName" msprop:Generator_ColumnVarNameInTable="columnFullName" msprop:Generator_ColumnPropNameInRow="FullName" msprop:Generator_ColumnPropNameInTable="FullNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" msprop:Generator_ColumnPropNameInRow="ManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CountryName" msprop:Generator_UserColumnName="CountryName" msprop:Generator_ColumnVarNameInTable="columnCountryName" msprop:Generator_ColumnPropNameInRow="CountryName" msprop:Generator_ColumnPropNameInTable="CountryNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="DocInfo" msprop:Generator_UserTableName="DocInfo" msprop:Generator_RowDeletedName="DocInfoRowDeleted" msprop:Generator_RowChangedName="DocInfoRowChanged" msprop:Generator_RowClassName="DocInfoRow" msprop:Generator_RowChangingName="DocInfoRowChanging" msprop:Generator_RowEvArgName="DocInfoRowChangeEvent" msprop:Generator_RowEvHandlerName="DocInfoRowChangeEventHandler" msprop:Generator_TableClassName="DocInfoDataTable" msprop:Generator_TableVarName="tableDocInfo" msprop:Generator_RowDeletingName="DocInfoRowDeleting" msprop:Generator_TablePropName="DocInfo">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="DocTypeName" msprop:Generator_UserColumnName="DocTypeName" msprop:Generator_ColumnPropNameInRow="DocTypeName" msprop:Generator_ColumnVarNameInTable="columnDocTypeName" msprop:Generator_ColumnPropNameInTable="DocTypeNameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ParentId" msprop:Generator_UserColumnName="ParentId" msprop:Generator_ColumnPropNameInRow="ParentId" msprop:Generator_ColumnVarNameInTable="columnParentId" msprop:Generator_ColumnPropNameInTable="ParentIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:Generator_ColumnPropNameInRow="DocNumber" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ContragentName" msprop:Generator_UserColumnName="ContragentName" msprop:Generator_ColumnPropNameInRow="ContragentName" msprop:Generator_ColumnVarNameInTable="columnContragentName" msprop:Generator_ColumnPropNameInTable="ContragentNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ContragentDocDate" msprop:Generator_UserColumnName="ContragentDocDate" msprop:Generator_ColumnPropNameInRow="ContragentDocDate" msprop:Generator_ColumnVarNameInTable="columnContragentDocDate" msprop:Generator_ColumnPropNameInTable="ContragentDocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="ContragentDocNumber" msprop:Generator_UserColumnName="ContragentDocNumber" msprop:Generator_ColumnPropNameInRow="ContragentDocNumber" msprop:Generator_ColumnVarNameInTable="columnContragentDocNumber" msprop:Generator_ColumnPropNameInTable="ContragentDocNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="PaymentDate" msprop:Generator_UserColumnName="PaymentDate" msprop:Generator_ColumnPropNameInRow="PaymentDate" msprop:Generator_ColumnVarNameInTable="columnPaymentDate" msprop:Generator_ColumnPropNameInTable="PaymentDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="DepartmentName" msprop:Generator_UserColumnName="DepartmentName" msprop:Generator_ColumnPropNameInRow="DepartmentName" msprop:Generator_ColumnVarNameInTable="columnDepartmentName" msprop:Generator_ColumnPropNameInTable="DepartmentNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CashName" msprop:Generator_UserColumnName="CashName" msprop:Generator_ColumnPropNameInRow="CashName" msprop:Generator_ColumnVarNameInTable="columnCashName" msprop:Generator_ColumnPropNameInTable="CashNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ContragentId" msprop:Generator_UserColumnName="ContragentId" msprop:Generator_ColumnVarNameInTable="columnContragentId" msprop:Generator_ColumnPropNameInRow="ContragentId" msprop:Generator_ColumnPropNameInTable="ContragentIdColumn" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="SmallParty" msprop:Generator_UserTableName="SmallParty" msprop:Generator_RowDeletedName="SmallPartyRowDeleted" msprop:Generator_RowChangedName="SmallPartyRowChanged" msprop:Generator_RowClassName="SmallPartyRow" msprop:Generator_RowChangingName="SmallPartyRowChanging" msprop:Generator_RowEvArgName="SmallPartyRowChangeEvent" msprop:Generator_RowEvHandlerName="SmallPartyRowChangeEventHandler" msprop:Generator_TableClassName="SmallPartyDataTable" msprop:Generator_TableVarName="tableSmallParty" msprop:Generator_RowDeletingName="SmallPartyRowDeleting" msprop:Generator_TablePropName="SmallParty">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="FullName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="FullName" msprop:Generator_ColumnVarNameInTable="columnFullName" msprop:Generator_ColumnPropNameInRow="FullName" msprop:Generator_ColumnPropNameInTable="FullNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RestQntty" msprop:Generator_UserColumnName="RestQntty" msprop:Generator_ColumnVarNameInTable="columnRestQntty" msprop:Generator_ColumnPropNameInRow="RestQntty" msprop:Generator_ColumnPropNameInTable="RestQnttyColumn" type="xs:int" />
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" />
              <xs:element name="BarCode" msprop:Generator_UserColumnName="BarCode" msprop:Generator_ColumnVarNameInTable="columnBarCode" msprop:Generator_ColumnPropNameInRow="BarCode" msprop:Generator_ColumnPropNameInTable="BarCodeColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Ostatki" msprop:Generator_UserTableName="Ostatki" msprop:Generator_RowDeletedName="OstatkiRowDeleted" msprop:Generator_RowChangedName="OstatkiRowChanged" msprop:Generator_RowClassName="OstatkiRow" msprop:Generator_RowChangingName="OstatkiRowChanging" msprop:Generator_RowEvArgName="OstatkiRowChangeEvent" msprop:Generator_RowEvHandlerName="OstatkiRowChangeEventHandler" msprop:Generator_TableClassName="OstatkiDataTable" msprop:Generator_TableVarName="tableOstatki" msprop:Generator_RowDeletingName="OstatkiRowDeleting" msprop:Generator_TablePropName="Ostatki">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="GoodsId" msprop:Generator_UserColumnName="GoodsId" msprop:Generator_ColumnPropNameInRow="GoodsId" msprop:Generator_ColumnVarNameInTable="columnGoodsId" msprop:Generator_ColumnPropNameInTable="GoodsIdColumn" type="xs:int" />
              <xs:element name="PartyId" msprop:Generator_UserColumnName="PartyId" msprop:Generator_ColumnPropNameInRow="PartyId" msprop:Generator_ColumnVarNameInTable="columnPartyId" msprop:Generator_ColumnPropNameInTable="PartyIdColumn" type="xs:int" />
              <xs:element name="FullName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="FullName" msprop:Generator_ColumnPropNameInRow="FullName" msprop:Generator_ColumnVarNameInTable="columnFullName" msprop:Generator_ColumnPropNameInTable="FullNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:Generator_ColumnPropNameInRow="ManufacturerName" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CountryName" msprop:Generator_UserColumnName="CountryName" msprop:Generator_ColumnPropNameInRow="CountryName" msprop:Generator_ColumnVarNameInTable="columnCountryName" msprop:Generator_ColumnPropNameInTable="CountryNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" />
              <xs:element name="BarCode" msprop:Generator_UserColumnName="BarCode" msprop:Generator_ColumnPropNameInRow="BarCode" msprop:Generator_ColumnVarNameInTable="columnBarCode" msprop:Generator_ColumnPropNameInTable="BarCodeColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RestQntty" msprop:Generator_UserColumnName="RestQntty" msprop:Generator_ColumnPropNameInRow="RestQntty" msprop:Generator_ColumnVarNameInTable="columnRestQntty" msprop:Generator_ColumnPropNameInTable="RestQnttyColumn" type="xs:int" />
              <xs:element name="BlockedParty" msprop:Generator_UserColumnName="BlockedParty" msprop:Generator_ColumnPropNameInRow="BlockedParty" msprop:Generator_ColumnVarNameInTable="columnBlockedParty" msprop:Generator_ColumnPropNameInTable="BlockedPartyColumn" type="xs:boolean" />
              <xs:element name="ContragentId" msprop:Generator_UserColumnName="ContragentId" msprop:Generator_ColumnPropNameInRow="ContragentId" msprop:Generator_ColumnVarNameInTable="columnContragentId" msprop:Generator_ColumnPropNameInTable="ContragentIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="SupplierPrice" msprop:Generator_UserColumnName="SupplierPrice" msprop:Generator_ColumnPropNameInRow="SupplierPrice" msprop:Generator_ColumnVarNameInTable="columnSupplierPrice" msprop:Generator_ColumnPropNameInTable="SupplierPriceColumn" type="xs:decimal" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="CurrentParty1" msprop:Generator_UserTableName="CurrentParty1" msprop:Generator_RowDeletedName="CurrentParty1RowDeleted" msprop:Generator_RowChangedName="CurrentParty1RowChanged" msprop:Generator_RowClassName="CurrentParty1Row" msprop:Generator_RowChangingName="CurrentParty1RowChanging" msprop:Generator_RowEvArgName="CurrentParty1RowChangeEvent" msprop:Generator_RowEvHandlerName="CurrentParty1RowChangeEventHandler" msprop:Generator_TableClassName="CurrentParty1DataTable" msprop:Generator_TableVarName="tableCurrentParty1" msprop:Generator_RowDeletingName="CurrentParty1RowDeleting" msprop:Generator_TablePropName="CurrentParty1">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="FullName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="FullName" msprop:Generator_ColumnVarNameInTable="columnFullName" msprop:Generator_ColumnPropNameInRow="FullName" msprop:Generator_ColumnPropNameInTable="FullNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" />
              <xs:element name="RestQntty" msprop:Generator_UserColumnName="RestQntty" msprop:Generator_ColumnVarNameInTable="columnRestQntty" msprop:Generator_ColumnPropNameInRow="RestQntty" msprop:Generator_ColumnPropNameInTable="RestQnttyColumn" type="xs:int" />
              <xs:element name="Blocked" msprop:Generator_UserColumnName="Blocked" msprop:Generator_ColumnVarNameInTable="columnBlocked" msprop:Generator_ColumnPropNameInRow="Blocked" msprop:Generator_ColumnPropNameInTable="BlockedColumn" type="xs:boolean" />
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="BatchNumber" msprop:Generator_UserColumnName="BatchNumber" msprop:Generator_ColumnVarNameInTable="columnBatchNumber" msprop:Generator_ColumnPropNameInRow="BatchNumber" msprop:Generator_ColumnPropNameInTable="BatchNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="BarCode" msprop:Generator_UserColumnName="BarCode" msprop:Generator_ColumnVarNameInTable="columnBarCode" msprop:Generator_ColumnPropNameInRow="BarCode" msprop:Generator_ColumnPropNameInTable="BarCodeColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DocQntty" msprop:Generator_UserColumnName="DocQntty" msprop:Generator_ColumnVarNameInTable="columnDocQntty" msprop:Generator_ColumnPropNameInRow="DocQntty" msprop:Generator_ColumnPropNameInTable="DocQnttyColumn" type="xs:int" />
              <xs:element name="ContragentDocDate" msprop:Generator_UserColumnName="ContragentDocDate" msprop:Generator_ColumnVarNameInTable="columnContragentDocDate" msprop:Generator_ColumnPropNameInRow="ContragentDocDate" msprop:Generator_ColumnPropNameInTable="ContragentDocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="SupplierPrice" msprop:Generator_UserColumnName="SupplierPrice" msprop:Generator_ColumnVarNameInTable="columnSupplierPrice" msprop:Generator_ColumnPropNameInRow="SupplierPrice" msprop:Generator_ColumnPropNameInTable="SupplierPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="cName" msprop:Generator_UserColumnName="cName" msprop:Generator_ColumnVarNameInTable="columncName" msprop:Generator_ColumnPropNameInRow="cName" msprop:Generator_ColumnPropNameInTable="cNameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" msprop:Generator_ColumnPropNameInRow="ManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ReadyBefore" msprop:Generator_UserColumnName="ReadyBefore" msprop:Generator_ColumnVarNameInTable="columnReadyBefore" msprop:Generator_ColumnPropNameInRow="ReadyBefore" msprop:Generator_ColumnPropNameInTable="ReadyBeforeColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="GoodsId" msprop:Generator_UserColumnName="GoodsId" msprop:Generator_ColumnVarNameInTable="columnGoodsId" msprop:Generator_ColumnPropNameInRow="GoodsId" msprop:Generator_ColumnPropNameInTable="GoodsIdColumn" type="xs:int" />
              <xs:element name="ContragentId" msprop:Generator_UserColumnName="ContragentId" msprop:Generator_ColumnVarNameInTable="columnContragentId" msprop:Generator_ColumnPropNameInRow="ContragentId" msprop:Generator_ColumnPropNameInTable="ContragentIdColumn" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:LinkGoods" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="Goods_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Goods" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="AbsenceDocInsert_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:AbsenceDocInsert" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="AbsenceLinesInsert_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:AbsenceLinesInsert" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="CurrentParty_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:CurrentParty" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="Departments_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Departments" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="vwGoodsDetailed_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:vwGoodsDetailed" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="DocInfo_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:DocInfo" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="CurrentParty1_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:CurrentParty1" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
  </xs:element>
</xs:schema>